user = "admin"
password = "123456"

def des(func):
    def fun():
        cur_user = input("请输入用户名：")
        cur_pass = input("请输入密码：")
        if cur_user == user and cur_pass == password:
            func()
            return True
        else:
            print("账号或密码错误,请重新输入")
            return False
    return fun

@des
def login():
    print("登陆成功!")

while True:
    if login():
        break

